﻿@using WebEntities
@using com.subb.Tools.Pager

@model PagedList<WI_News>

@{
    ViewBag.Title = "查找新闻资讯";
    Layout = "~/Views/Shared/_DefLayout.cshtml";
}

<div class="topadimg"><img src="/Images/banner02.jpg" /></div>
@Html.Action("LeftMenu", new { cataId = 0 })
<div class="subright">
    <div class="pagepath"><a href="/"><img src="/Images/homeicon.jpg" alt="首页" /></a> &gt; <a href="/newsinfo">新闻资讯</a> &gt; <span>查找新闻</span></div>
    <div class="midcontent">
        <div class="news_searesult">
            <div class="searesultxt">查找结果：一共找到 <b>@ViewBag.SearchCount</b> 篇文章</div>
            <div class="seabar">
                @using (Html.BeginForm("searchnews", "newsinfo", FormMethod.Post, new { id = "form1" }))
                {
                    @Html.TextBox("seakey", (string)ViewBag.SearchKey, new { @class = "seachtext" })
                    <img src="/Images/searchbtn.jpg" alt="" id="searchbtn" />
                }
            </div>
            <div class="cls"></div>
        </div>
        <div class="newsbar">
            <div class="nl1">新闻标题</div>
            <div class="nr1">发布日期</div>
            <div class="cls"></div>
        </div>
        @foreach (var news in Model)
        {
            <div class="nrow">
                <div class="nl1"><a href="/newsinfo/details/@news.NewsID" target="_blank">@news.NewsTitle</a></div>
                <div class="nr1">@((news.PubTime.HasValue ? news.PubTime : news.CreateTime).Value.ToString("yyyy/MM/dd"))</div>
            </div>
        }
        <div class="cls"></div>
        @Html.Pager(Model, new PagerOptions
        {
           PageIndexParameterName = "id",
           CurrentPagerItemWrapperFormatString = "<span class=\"currpage\">{0}</span>", 
                NumericPagerItemWrapperFormatString = "<span class=\"pagenum\">{0}</span>", CssClass = "pager", SeparatorHtml = "" })
    </div>
</div>
<div class="cls"></div>

